#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: fu
"""

import Common
import Config

class Food:
    def __init__(self):
        self.rect = Common.pygame.Rect(-20, -10, 40, 40)
        
        self.type = Common.random.randint(0, 1)
        if self.type == 0:
            self.color = 'img/Decorations/' + 'Health 2' + '.png'
        if self.type == 1:
            self.color = 'img/Decorations/' + 'art' + str(Common.random.randint(1, 10)) + ' 1' + '.png'
        
    def set(self, m = Config.MARGIN):
        self.rect.top  = Common.random_even(m * 2, Config.MAP_Y - m * 2) * 10
        self.rect.left = Common.random_even(m, Config.MAP_X - m) * 20
        